//获取应用实例
let app = getApp();
Page({
    data: {
        isShowPage: true,
        progressList: []
    },
    onLoad(option) {
        let orderId = option.orderId,
            that = this;
        let opt = {
            url: app.globalData.host+"/wx/hkmdc/detail.ajax",
            data: {
                orderId: orderId
            },
            sucFn(result) {
                let progressList = [];
                for(let i = 0; i < result.body.processlist.length; i++){
                    let json = {
                        "name": result.body.processlist[i].name,
                        "createTime": app.toYMDHMSDate(result.body.processlist[i].createTime)
                    };
                    progressList.push(json);
                }

                that.setData({
                    orderId: orderId,
                    carArchivesNbr: result.body.carArchivesNbr,
                    isShowPage: true,
                    progressList: progressList
                });
            }
        };
        app.ajax(opt);
    }
});
